function orderCtrl(){
    this.showMore = $('#show_more'); //更多搜索条件
    this.isShow = $('.isShow'); //展示隐藏的按钮
    this.acrossSplit = $('.acrossSplit'); //横拆按钮
    this.init();
}
orderCtrl.prototype = {
    //
    init:function(){
        this.bind();
    },
    bind:function(){
        var _this = this;
        this.showMore.on('click',function(){
            _this.showIpt();
        });
        this.acrossSplit.on('click',function(){
            var self = $(this);
            var type = self.data('across_split');
        });
        this.acrossSplit.on('click',function(){
            _this.acrossSplitUnit({'weight':133,'volume':233});
        });
        $(document).on('click','.modal_close',function(){
            $('.modal_fixed').remove();
        });
    },
    showIpt:function(){ //搜索框展示隐藏
        if(this.isShow.hasClass('hide')){
            this.isShow.removeClass('hide');
            this.showMore.html('收起');
        }else{
            this.isShow.addClass('hide');
            this.showMore.html('更多搜索条件');
        }
    },
    acrossSplitUnit:function(data){//横拆,单位，吨
        var weight = data.weight; //重量吨
        var volume = data.volume; //体积
        var html = '';
        var cm = new commons();
        html += '<div class="modal_fixed">';
        html += '<div class="tms_modal_container">';
        html += '<a class="modal_close"></a>';
        html += '<div class="tms_modal_content">';

        html += '<div class="top_split_change">';
        html += '<span class="name">拆分方式</span>';
        html += '<label class="choose_group"><input type="radio" value="" name="split" class="radio_common" checked="true"><i class="radio_icon"></i>横拆</label>';
        html += '<label class="choose_group"><input type="radio" value="" name="split" class="radio_common"><i class="radio_icon"></i>纵拆</label>';
        html += '</div>';


        html += '<div id="acrossSplit">';
        html += '<form>';
        html += '<ul class="add_order_list acrossList">';
        html += '<li><span class="input_name">重量：</span><input type="text" class="fill_input split_input"><span class="unit">吨</span></li>';
        html += '<li><span class="input_name">体积：</span><input type="text" class="fill_input split_input"><span class="unit">m³</span></li>';
        html += '<li><input type="button" value="继续拆单" class="add_button pull_right split_button"></li>';
        html += '</ul>';

        html += '<ul class="split_detail">';
        html += '<li>拆单1：<span>重量'+weight+'</span><span>体积'+volume+'</span></li>'
        html += '</ul>';

        html += '</form>';
        html += '</div>';

        html += '<div style="display:none">'; //纵拆
        html += '<form>';
        html += '<ul class="add_order_list acrossList clear">';
        html += '<li><span class="input_name">整车：</span><input type="text" class="fill_input split_input"><span class="unit">车</span></li>';
        html += '</ul>';
        html += '</form>';
        html += '</div>';

        html += '</div>';
        html += '<div class="modal_bottom_btn tms_modal_bottom"><input type="button" value="确定" class="bottom_ok normal_btn save_send"></div>';
        html += '</div>';
        $('body').append(html);
        $('.modal_fixed').show();
        cm.fixMargin($('.tms_modal_container'));
    },
    acrossSplitCar:function(){

    },
    pagePrint:function(){ //打印

    }
};
$(function(){
    new orderCtrl();
})
